import { request } from '@pkg/request/src';

export enum Api {
  page = '/slider/link/page',
  list = '/slider/link/list',
  get = '/slider/link/get',
  batchSave = '/slider/link/batchSave',
  update = '/slider/link/update',
  remove = '/slider/link/remove',
}

/**
 * 保存或更新
 * @param params
 * @param isUpdate
 */
export const saveOrUpdate = (params, isUpdate) => {
  let url = isUpdate ? Api.update : Api.save;
  return request.post({ url: url, params });
};

/**
 * 查询详情
 * @param params
 */
export const getBusAirportGivegoodsnum = (params) => {
  return request.get({ url: Api.get, params });
};

export const batchSave = (sliderId:any,shopIds: any) =>{
  return request.post({
    url: Api.batchSave,
    params: { sliderId: sliderId,busId:shopIds,busType:"Shop" },
  });
}
